package com.example.cloudmusic.app

import android.app.Application
import cn.leancloud.LCObject
import cn.leancloud.LeanCloud
import com.example.lib_leancloud.LC_APP_ID
import com.example.lib_leancloud.LC_APP_KEY
import com.example.lib_leancloud.LC_SEVER_URL
import com.example.lib_leancloud.model.Adv
import com.example.lib_leancloud.model.Chart
import com.example.lib_leancloud.model.Music

class MyApplication: Application() {
    override fun onCreate() {
        super.onCreate()

        //注册LeanCLoud中自定义的类
        LCObject.registerSubclass(Adv::class.java)
        LCObject.registerSubclass(Chart::class.java)
        LCObject.registerSubclass(Music::class.java)

        //三方库初始化
        LeanCloud.initialize(
            this,
            LC_APP_ID,
            LC_APP_KEY,
            LC_SEVER_URL
        )
    }
}